<?php 
	$indicators='';
	$imagenes='';
	$i=0;
	
	foreach($cronicas as $cronica){

		$indicators.='<li data-target="#carousel" data-slide-to="'.$i.'" ';
		if(!$i){$indicators.= 'class="active"';}
		$indicators.='></li>';
		
		$imagenes.='<div class="item';
		if(!$i){$imagenes.=' active';}
		$imagenes.='">'.HTML::image(URL::asset('assets/img/cronicas/'.$cronica->imagen));
		$imagenes.='<div class="carousel-caption"><h3><a href="'.URL::route('cronica.detalle',$cronica->id).'">'.$cronica->titulo.'</a></h3><p>'.STR::words($cronica->descripcion,25).' - <a href="'.URL::route('cronica.detalle',$cronica->id).'">leer mas</a></p></div>';
		$imagenes.='</div>';
		++$i;
	}

	?>
<div id="slider">
	
	<div id="carousel" class="carousel slide" data-ride="carousel">
		  <!-- Indicators -->
		  <ol class="carousel-indicators">
		    {{ $indicators }}
		  </ol>
		  <!-- Wrapper for slides -->
		  <div class="carousel-inner">
		    {{ $imagenes }}
		  </div>
		  <!-- Controls -->
		  <a class="left carousel-control" href="#carousel" data-slide="prev">
		    <span class="glyphicon glyphicon-chevron-left"></span>
		  </a>
		  <a class="right carousel-control" href="#carousel" data-slide="next">
		    <span class="glyphicon glyphicon-chevron-right"></span>
		  </a>
	</div>
</div>